package lion.web.interceptors.cluster;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionContext;

/**
 * 复写了一些httpsession的方法
 *
 * <pre>
 * time   2013 2013年12月19日 下午4:54:32
 * mail   hl_0074@sina.com
 * </pre>
 *
 * @author lion
 */
@SuppressWarnings("deprecation")
public abstract class ClusteredSessionWrapper implements HttpSession {

	protected HttpSession httpSession;

	public ClusteredSessionWrapper(HttpSession session) {

		this.httpSession = session;
	}

	@Deprecated
	@Override
	public Object getValue(String key) {

		return this.httpSession.getValue(key);
	}

	@Override
	@Deprecated
	public void removeValue(String key) {

		this.httpSession.removeValue(key);
	}

	@Override
	public String getId() {

		return this.httpSession.getId();
	}

	@Override
	public long getCreationTime() {

		return this.httpSession.getCreationTime();
	}

	@Override
	public long getLastAccessedTime() {

		return this.httpSession.getLastAccessedTime();
	}

	@Override
	public int getMaxInactiveInterval() {

		return this.httpSession.getMaxInactiveInterval();
	}

	@Override
	public ServletContext getServletContext() {

		return this.httpSession.getServletContext();
	}

	@Override
	@Deprecated
	public HttpSessionContext getSessionContext() {

		return this.httpSession.getSessionContext();
	}

	@Override
	public String[] getValueNames() {

		return null;
	}

	@Override
	public boolean isNew() {

		return this.httpSession.isNew();
	}

	@Deprecated
	@Override
	public void putValue(String key, Object value) {

		this.httpSession.putValue(key, value);
	}

	@Override
	public void setMaxInactiveInterval(int paramInt) {

		this.httpSession.setMaxInactiveInterval(paramInt);

	}

}
